/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-19 14:42:56
 * @LastEditors: wanghuan wanghuan@sgsimulation.com
 * @LastEditTime: 2024-08-30 13:40:15
 * @FilePath: \SGFEM\DataStructure\FEM\Load\include\FORCEData.h
 * @Description: 集中力，力的大小和方向通过一个坐标系及在该坐标系下的分量确定
 * 可以使用载荷因子对载荷大小进行缩放
 * FORCE
 */
#pragma once
#include <vector>

#include "Utility/Algebra/Vector3D.h"

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Common/SetBase.h"
#include "DataStructure/Input/Load/LoadTypes.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct FORCEData : public SetBase
{
    SG::DataStructure::Common::Id   m_nodeId      = 0;        ///< 载荷作用节点
    SG::DataStructure::Common::Id   m_coordSysmId = 0;        ///< 局部坐标系id
    SG::DataStructure::Common::Real m_factor      = 0.0;      ///< 载荷系数
    SG::DataStructure::Common::Real m_load[3]     = { 0.0 };  ///< 载荷向量
    SG::DataStructure::Common::Id   m_domainId    = 0;
    static SG::DataStructure::FEM::LoadType GetType ()
    {
        return SG::DataStructure::FEM::LoadType::LOAD_ConcentratedForce;
    };
    SG::Algebra::Vector3D GetLoad () const
    {
        return { m_load[0], m_load[1], m_load[2] };
    }
};

using FORCEDataArray = std::vector<SG::DataStructure::FEM::FORCEData>;

/// @brief 节点弯矩， 力的大小和方向通过一个坐标系及在该坐标系下的分量确定
using MOMENTData      = FORCEData;
using MOMENTDataArray = std::vector<SG::DataStructure::FEM::MOMENTData>;

DECLSPEC bool operator== (const FORCEData& lhs, const FORCEData& rhs);

DECLSPEC bool operator< (const FORCEData& SGDataA, const FORCEData& SGDataB);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE